import request from '@/plugin/axios'

// 获取当前项目
export const projectList = data => {
  // return request(`/api/v1/project?pageNum=${pageNum}&pageSize=${PAGE_SIZE}&${whereStr}`)
  return request({
    url: '/v1/project',
    method: 'get',
    params: data
  })
}

// 创建项目
export const createProject = data => {
  return request({
    url: '/v1/project',
    method: 'post',
    data
  })
}

// 修改项目
export const updateProject = data => {
  return request({
    url: `/v1/project/${data.id}`,
    method: 'put',
    data
  })
}

// 删除项目
export const delProject = data => {
  return request({
    url: `/v1/project/${data.id}`,
    method: 'delete',
    data
  })
}

// 批量删除项目
export const delAll = data => {
  return request({
    url: `/v1/project/${data.id[0]}`,
    method: 'delete',
    data
  })
}
